import request from '@/utils/request'
// 获取权限的里列表
export const getPermissionAPI = () => {
  return request({
    url: '/sys/permission'
  })
}
// 新增权限点
export function addPermissionAPI(data) {
  return request({
    method: 'post',
    url: '/sys/permission',
    data
  })
}
// 删除权限点
export function delPermissionAPI(id) {
  return request({
    method: 'DELETE',
    url: `/sys/permission/${id}`
  })
}
// 查看权限点详情
export function lookPermissionAPI(id) {
  return request({
    url: `/sys/permission/${id}`
  })
}
// 修改权限
export function editPermissionAPI(data) {
  return request({
    method: 'put',
    url: `/sys/permission/${data.id}`,
    data
  })
}
